Quiz on Important API Concepts - I
Test your understanding of important API concepts.
A company has hired you to develop a new social media platform that will compete with today’s big names, such as Twitter and Facebook.
You need to meet the following requirements for this new social media application:
- It should be optimized for SEO and should be easily discoverable by web crawlers.
- Users should not have to wait long for the initial loading of the website.
- The platform should quickly show updated data on the web page.
- The website should be able to display and handle dynamic data effectively.
Given this information, what type of rendering should be used for the platform?
Server-side rendering (SSR)
SSR would help with requirements 1 and 3.
However, trying to meet the other requirements with SSR would potentially cause the website’s performance to degrade and increase the load on the server.
Client-side rendering (CSR)
CSR would help with requirement 4.
However, it would contradict requirements 1 and 2.
Using both at different stages.
Both approaches have their pros and cons, and the best thing for this scenario is to use both techniques at different stages.
You can use SSR during the initial loading phases of the platform. This will help with meeting requirements 1 and 2.
Then, you can take advantage of libraries that use CSR, such as React and Vue, to help meet the rest of the requirements.
Server-Side Rendering vs. Client-Side Rendering
Speeding up Web Page Loading